﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace AfterCaveStory
{

    class Quote : PhysicsObject
    {
        public Quote(Texture2D textura, Nullable<Rectangle> sourceRectangle, float depth)
            : base(textura, sourceRectangle, depth)
        {
        }

        public override void update(World world)
        {
            if(Controller.KeyDown(Keys.Left))
            {
                velocity.X += -aceleration;
            }
            else if (Controller.KeyDown(Keys.Right))
            {
                velocity.X += aceleration;
            }

            if ((Controller.KeyPressed(Keys.Up)) && (onGround))
            {
                velocity.Y = -9;
            }

            base.update(world);
        }
    }
}
